This simulation code package is mainly used to reproduce the results of the following paper [1]:

[1] C. Hu, L. Dai, S. Han, and X. Wang, "Two-timescale channel estimation for reconfigurable intelligent surface aided wireless communications," IEEE Trans. Commun., , vol. 69, no. 11, pp. 7736-7747, Nov. 2021.

*********************************************************************************************************************************
If you use this simulation code package in any way, please cite the original paper [1] above. 

The author in charge of this simulation code pacakge is: Chen Hu (email: huc16@mails.tsinghua.edu.cn, 1284680812@qq.com).

Reference: We highly respect reproducible research, so we try to provide the simulation codes for our published papers (more information can be found at: 
http://oa.ee.tsinghua.edu.cn/dailinglong/publications/publications.html). 

Please note that the MATLAB R2012a is used for this simulation code package,  and there may be some imcompatibility problems among different MATLAB versions. 

Copyright reserved by the Broadband Communications and Signal Processing Laboratory (led by Dr. Linglong Dai), Tsinghua National Laboratory
for Information Science and Technology (TNList), Department of Electronic Engineering, Tsinghua University, Beijing 100084, China. 

*********************************************************************************************************************************
Abstract of the paper: 

Channel estimation is challenging for the reconfigurable
intelligent surface (RIS)-aided wireless communications.
Since the number of coefficients of the cascaded channel among
the base station (BS), the RIS and the user equipment (UE)
is the product of the number of BS antennas, the number of
RIS elements, and the number of UEs, the pilot overhead can
be prohibitively high. In this paper, we propose a two-timescale
channel estimation framework to exploit the property that the
BS-RIS channel is high-dimensional but quasi-static, while the
RIS-UE channel is mobile but low-dimensional. Specifically, to
estimate the quasi-static BS-RIS channel, we propose a duallink
pilot transmission scheme, where the BS transmits downlink
pilots and receives uplink pilots reflected by the RIS. Then, we
propose a coordinate descent-based algorithm to recover the BSRIS
channel. Since the quasi-static BS-RIS channel is estimated
less frequently than the mobile channel is, the average pilot
overhead can be reduced from a long-term perspective. Although
the mobile RIS-UE channel has to be frequently estimated in a
small timescale, the associated pilot overhead is low thanks to its
low dimension. Simulation results show that the proposed twotimescale
channel estimation framework can achieve accurate
channel estimation with low pilot overhead.

Index TermsReconfigurable intelligent surface, channel estimation,
pilot overhead

*********************************************************************************************************************************
How to use this simulation code package?

1. Open folder "load data and plot" and run "load_and_plot.m", you will see the results in our paper in a second. It will load the data and plot the results.

2. Run "convergence.m" to see the results in Fig. 7.

3. Run "NMSE_SR_SNR_Comparison.m" to perform Monte-Carlo simulations to see the results in Figs. 8-10.

4. The functions in folder "tools" are the functions used in my paper:
    "ACE_RIS_1bit.m" is a joint percoding and reflection optimization function. 
    "ReflectionPilotTransmission.m" is the dual-link pilot transmission procedure for the large-timescale channel estimation.
    "ReflectionChannelEstimation.m" is the coordinate-descent based channel estimation for the large-timescale channel estimation.
    "UEUplinkPilotTransmission.m" is the uplink pilot transmission procedure for the small-timescale channel estimation.
    "UEUplinkChannelEstimation.m" is the LS-based channel estimation for the small-timescale channel estimation.

5. The functions in folder "baseline" are the methods from other papers (NOT our method). Please see the references papers to understand their methods.

[14] Z. Wang, L. Liu, and S. Cui, "Channel estimation for intelligent reflecting surface assisted multiuser communications: Framework, algorithms, and analysis," IEEE Trans. Wireless Commun., vol. 19, no. 10, pp. 6607-6620, Oct. 2020.

[17] P. Wang, J. Fang, H. Duan, and H. Li, "Compressed channel estimation for intelligent reflecting surface-assisted millimeter wave systems," IEEE Signal Process. Lett., vol. 27, pp. 905-909, May 2020.

*********************************************************************************************************************************
Enjoy the reproducible research!
